import request from "@/api/index"

export default{
  /**
   * @description: 根据鱼塘Id查询最新数据 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryNewByFishPondId(params){
    const url = "/iot/dataCollect/queryNewByFishPondId"
    return request.get(url,{
      ...params
    })
  },
  /**
   * @description: 根据数据项列表查询历史数据 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryHistoryByList(params){
    const url = "/iot/dataCollect/queryHistoryByListAndInterval"
    return request.get(url,{
      ...params
    })
  },
  /**
   * @description: 根据鱼塘Id，数据类型名称和时间查询平均值 *代表必填
   * @param {String} collectTime *
   * @param {String} dataTypeName *
   * @param {Int} fishPondId *
   * @return {Object}
   */
  queryDataByTime(params){
    const url = "/iot/dataCollect/queryNewByFishPondIdAndTimeAndDataTypeName"
    return request.get(url,{
      ...params
    })
  },

}
